package service.Seller.impl;



import dao.Seller.GoodsDao;
import dao.Seller.impl.GoodsImpl;
import pojo.Goods;
import service.Seller.GoodsService;


import java.util.List;

public class GoodsServiceImpl implements GoodsService{
     private GoodsDao goodsDao;
     public GoodsServiceImpl(){
         goodsDao= new GoodsImpl();
     }

    @Override
    public List<Goods> getGoodes() {
        return goodsDao.getGoodes();
    }

    @Override
    public List<Goods> getFuzzyquery(String goodsNames, int sellerid, int smallId) {
        return goodsDao.getFuzzyquery(goodsNames,sellerid,smallId);
    }
    @Override
    public int deleteGoods(int id) { return goodsDao.deleteGoods(id); }
    @Override
    public int updataGoods(Goods goods) { return goodsDao.updataGoods(goods); }

    @Override
    public Goods getGoodsId(int Goodsid) {
        return goodsDao.getGoodsId(Goodsid);
    }

    @Override
    public int getCount(int cId, String Names) {
        return goodsDao.getCount(cId,Names);
    }

    @Override
    public int getCountPage(int count, int page) {
        return goodsDao.getCountPage(count,page);
    }

    @Override
    public List<Goods> NewsfindAll(int cId, String name, int count, int page) {
        return goodsDao.NewsfindAll(cId,name,count,page);
    }

    @Override
    public int addGoods(Goods goods) {
        return goodsDao.addGoods(goods);
    }
}
